$().ready(function(){	
	initFlashUpload();
})


function initFlashUpload(){
	$('#file_upload').uploadify({
			'uploader'       : ($("#newsurl").val())+'skin/jquery.uploadify-v2.1.4/uploadify.swf',
			'script'         : ($("#newsurl").val())+'e/jat/tribe_up_pic.php',
			'cancelImg'      : ($("#newsurl").val())+'skin/jquery.uploadify-v2.1.4/cancel.png',
			'folder'         : ($("#newsurl").val())+'skin/upload',
			'multi'          : true,
			'auto'           : false,
			//'buttonText'  : 'brower',
			'height':41,
			'width':142,
			'sizeLimit':(1024*1000*2),
			'queueSizeLimit':11,
			'onQueueFull':function(event,queueSizeLimit){
				alert("队列已满！");
				return false;
			},
			'buttonImg':($("#newsurl").val())+'images/upbtn.jpg',
			"scriptData":{"id":$("#app_id").val(),'a_id':($('#slt_album').val()),'sid':($("#session_id").val()||"")},
			'onComplete':function(event, ID, fileObj, response, data) {					
				var o=getObject(response);					
			if(o){
				if(o.flag==1){					
					window.location.href='./?m=pho&id='+$("#app_id").val();
				}else{
					alert(o.msg);
				}
			}else{
				alert('系统错误！');
			}		
		},
		"":function(){
		
		},
		"onAllComplete"	:function(){					
			//$(".list-p").append("<div class='clear'></div>");
			//$(".ok_div").show();
		}
		  });
}
function join_tribe(){
	alert(123);
}
function setUpFileStart(){
	$('#file_upload').uploadifyUpload();
}